package controllers

import (
	"github.com/astaxie/beego"
	"fmt"
	"strconv"
)

type TestPostControllers struct {
	beego.Controller
}

func (c *TestPostControllers) Get() {
	fmt.Println("进来了")
	v := c.Ctx.Input.Param(":id")
	fmt.Println("传过来的参数：", v)
	c.Ctx.WriteString(c.Ctx.Input.IP() + ":" + strconv.Itoa(c.Ctx.Input.Port()))
}

func (t *TestPostControllers) Post() {
	t.Ctx.WriteString("你好")
}